
package com.yzd.netmonitor.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.yzd.netmonitor.dao.AsstClientDao;
import com.yzd.netmonitor.model.AsstClient;
import com.yzd.netmonitor.model.AsstMessage;
import com.yzd.netmonitor.service.AsstClientService;
import com.yzd.netmonitor.service.base.AbstractMyBatisBaseService;

@Service(value = "assClientService")
public class AssClientServiceImpl extends AbstractMyBatisBaseService<AsstClient, Integer, AsstClientDao>
		implements AsstClientService {

	@Resource(name = "asstClientDao", type = AsstClientDao.class)
	private AsstClientDao asstClientDao;

	@Override
	protected AsstClientDao getDao() {

		return asstClientDao;
	}

	@Override
	public AsstClient getByUuid(String uuid) {

		return asstClientDao.getByUuid(uuid);
	}

	@Override
	public List<AsstMessage> getMessagesByClientIp(String clientIp) {

		return asstClientDao.getMessagesByClientIp(clientIp);
	}

	@Override
	public AsstClient saveTest(AsstClient a) {

		if (null == a.getId()) {
			save(a);
		} else {

		}
		return a;
	}
}
